Fix pltcheck issues
authorMatthias Clasen <matthiasc@src.gnome.org>
Fri, 23 Jan 2009 17:10:08 +0000 (17:10 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Fri, 23 Jan 2009 17:10:08 +0000 (17:10 +0000)
svn path=/trunk/; revision=22198

ChangeLog
gtk/gtkrecentchooser.c
gtk/gtkuimanager.c

index c49d38941de615c410559c3529be2d00e9c4c587..889fe896276d0c921d42acf55233cc1e7fe24155 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-01-23  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtkrecentchooser.c:
+       * gtk/gtkuimanager.c: Fix issues found by pltcheck
+
 2009-01-23  Matthias Clasen  <mclasen@redhat.com>
 
        * NEWS: Updates
index 298a12530074e26d955e296b8fa5d80fe7aa10d5..7002663574f74eed5f423dbcc1aefc2942fb529e 100644 (file)
@@ -1103,8 +1103,8 @@ _gtk_recent_chooser_activatable_update (GtkActivatable *activatable,
   GtkRecentAction  *recent_action  = GTK_RECENT_ACTION (action);
 
   if (strcmp (property_name, "show-numbers") == 0 && recent_chooser_has_show_numbers (recent_chooser))
-      gtk_recent_chooser_set_show_numbers (recent_chooser, 
-                                          gtk_recent_action_get_show_numbers (recent_action));
+    g_object_set (recent_chooser, "show-numbers",
+                  gtk_recent_action_get_show_numbers (recent_action), NULL);
   else if (strcmp (property_name, "show-private") == 0)
     gtk_recent_chooser_set_show_private (recent_chooser, gtk_recent_chooser_get_show_private (action_chooser));
   else if (strcmp (property_name, "show-not-found") == 0)
@@ -1134,8 +1134,9 @@ _gtk_recent_chooser_activatable_reset (GtkActivatable *activatable,
     return;
 
   if (recent_chooser_has_show_numbers (recent_chooser))
-    gtk_recent_chooser_set_show_numbers (recent_chooser, 
-                                        gtk_recent_action_get_show_numbers (GTK_RECENT_ACTION (action)));
+    g_object_set (recent_chooser, "show-numbers", 
+                  gtk_recent_action_get_show_numbers (GTK_RECENT_ACTION (action)),
+                  NULL);
   gtk_recent_chooser_set_show_private (recent_chooser, gtk_recent_chooser_get_show_private (action_chooser));
   gtk_recent_chooser_set_show_not_found (recent_chooser, gtk_recent_chooser_get_show_not_found (action_chooser));
   gtk_recent_chooser_set_show_tips (recent_chooser, gtk_recent_chooser_get_show_tips (action_chooser));
index 1066af9227b48bb85136b8ba26697f52c59c9db4..24267a6bfa301ec0a748d50f24880da59d35de27 100644 (file)
@@ -31,6 +31,7 @@
 #include "config.h"
 
 #include <string.h>
+#include "gtkactivatable.h"
 #include "gtkbuildable.h"
 #include "gtkintl.h"
 #include "gtkmarshalers.h"
@@ -2351,7 +2352,7 @@ update_node (GtkUIManager *self,
                }
              }
 
-           gtk_action_disconnect_proxy (info->action, info->proxy);
+            gtk_activatable_set_related_action (GTK_ACTIVATABLE (info->proxy), NULL);
            gtk_container_remove (GTK_CONTAINER (info->proxy->parent),
                                  info->proxy);
            g_object_unref (info->proxy);
@@ -2416,7 +2417,7 @@ update_node (GtkUIManager *self,
              }
          }
        else
-         gtk_action_connect_proxy (action, info->proxy);
+          gtk_activatable_set_related_action (GTK_ACTIVATABLE (info->proxy), action);
        
        if (prev_submenu)
          {
@@ -2559,7 +2560,7 @@ update_node (GtkUIManager *self,
          g_signal_handlers_disconnect_by_func (info->proxy,
                                                G_CALLBACK (update_smart_separators),
                                                NULL);  
-         gtk_action_disconnect_proxy (info->action, info->proxy);
+          gtk_activatable_set_related_action (GTK_ACTIVATABLE (info->proxy), NULL);
          gtk_container_remove (GTK_CONTAINER (info->proxy->parent),
                                info->proxy);
          g_object_unref (info->proxy);
@@ -2587,7 +2588,7 @@ update_node (GtkUIManager *self,
                                                G_CALLBACK (update_smart_separators),
                                                NULL);
          gtk_menu_item_set_submenu (GTK_MENU_ITEM (info->proxy), NULL);
-         gtk_action_connect_proxy (action, info->proxy);
+          gtk_activatable_set_related_action (GTK_ACTIVATABLE (info->proxy), action);
        }
 
       if (info->proxy)
@@ -2611,7 +2612,7 @@ update_node (GtkUIManager *self,
          g_signal_handlers_disconnect_by_func (info->proxy,
                                                G_CALLBACK (update_smart_separators),
                                                NULL);
-         gtk_action_disconnect_proxy (info->action, info->proxy);
+          gtk_activatable_set_related_action (GTK_ACTIVATABLE (info->proxy), NULL);
          gtk_container_remove (GTK_CONTAINER (info->proxy->parent),
                                info->proxy);
          g_object_unref (info->proxy);
@@ -2638,7 +2639,7 @@ update_node (GtkUIManager *self,
          g_signal_handlers_disconnect_by_func (info->proxy,
                                                G_CALLBACK (update_smart_separators),
                                                NULL);
-         gtk_action_connect_proxy (action, info->proxy);
+         gtk_activatable_set_related_action (GTK_ACTIVATABLE (info->proxy), action);
        }
 
       if (info->proxy)